

package com.maoshi.shop.distribution.comment.model;

import com.maoshi.shop.distribution.comment.vo.DistributionUserVO;
import com.maoshi.shop.bean.vo.UserVO;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;

@Data
@TableName( "tz_distribution_user_bind")
public class DistributionUserBind implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 用户关系表
     */
    @TableId
    private Long bindId;

    /**
     * 分销员id
     */
    private Long distributionUserId;

    /**
     * 店铺id
     */
    private Long shopId;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 当前绑定关系(0 失效 1生效)
     */
    private Integer state;

    /**
     * 失效原因(0 超过有效期 1 管理员更改 2抢客)
     */
    private Integer invalidReason;

    /**
     * 变动时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 绑定时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date bindTime;

    /**
     * 失效时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date invalidTime;
    /**
     * 关联用户
     */
    @TableField(exist = false)
    private UserVO user;

    /**
     * 关联分销员
     */
    @TableField(exist = false)
    private DistributionUserVO distributionUser;

}
